package com.eventapp.model;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Access;
import javax.persistence.AccessType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

import org.hibernate.annotations.Fetch;
import org.hibernate.annotations.FetchMode;

@Entity
@Table(name="comments")
@Access(AccessType.FIELD)
@XmlRootElement
public class Comment extends BaseObject implements Serializable
{
   private static final long serialVersionUID = 1L;

   @Id
   @GeneratedValue
   private Long id;
   private String comment; 
   @ManyToOne
   @JoinColumn(name = "userId")
   private User user; 
   private Date time;

   
@Override
public boolean equals(Object o) {
	// TODO Auto-generated method stub
	return false;
}

public String getComment() {
	return comment;
}

public Long getId() {
	return id;
}

public Date getTime() {
	return time;
}


public User getUser() {
	return user;
}

@Override
public int hashCode() {
	// TODO Auto-generated method stub
	return 0;
}

public void setComment(String comment) {
	this.comment = comment;
}

public void setId(Long id) {
	this.id = id;
}

public void setTime(Date time) {
	this.time = time;
}

public void setUser(User user) {
	this.user = user;
}

@Override
public String toString() {
	// TODO Auto-generated method stub
	return null;
}


}